package com.example.pojo.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

@ApiModel("季鑫利:分页参数")
public class PageDTO {
    @ApiModelProperty("页码")
    private Integer pageNum;
    @ApiModelProperty(value = "跳过数据个数",hidden = true)
    private Integer skip;
    @ApiModelProperty("每页获取个数")
    private Integer take;

    public Integer getPageNum() {
        return pageNum;
    }

    public void setPageNum(Integer pageNum) {
        this.pageNum = pageNum;
    }


    public Integer getSkip() {
        this.skip = (this.pageNum - 1) * this.take;
        return skip;
    }

    public void setTake(Integer take) {
        this.take = take;
    }

    public Integer getTake() {
        return take;
    }

    @Override
    public String toString() {
        return "PageDTO{" +
                "pageNum=" + pageNum +
                ", skip=" + skip +
                ", take=" + take +
                '}';
    }
}
